/*
 * ShareBean.java
 * business
 *
 * Created by ChenTao on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/** 用于分享 */
public class ShareEntity implements Parcelable {

    @SerializedName("title")
    private String title;

    @SerializedName("text")
    private String text;

    @SerializedName("img")
    private String img;

    @SerializedName("need_login")
    private int needLogin;

    @SerializedName("url")
    private String url;

    @SerializedName("redirect_url")
    private String redirectUrl;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public int getNeedLogin() {
        return needLogin;
    }

    public void setNeedLogin(int needLogin) {
        this.needLogin = needLogin;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getRedirectUrl() {
        return redirectUrl;
    }

    public void setRedirectUrl(String redirectUrl) {
        this.redirectUrl = redirectUrl;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.title);
        dest.writeString(this.text);
        dest.writeString(this.img);
        dest.writeInt(this.needLogin);
        dest.writeString(this.url);
        dest.writeString(this.redirectUrl);
    }

    public ShareEntity() {
    }

    protected ShareEntity(Parcel in) {
        this.title = in.readString();
        this.text = in.readString();
        this.img = in.readString();
        this.needLogin = in.readInt();
        this.url = in.readString();
        this.redirectUrl = in.readString();
    }

    public static final Parcelable.Creator<ShareEntity> CREATOR = new Parcelable.Creator<ShareEntity>() {
        @Override
        public ShareEntity createFromParcel(Parcel source) {
            return new ShareEntity(source);
        }

        @Override
        public ShareEntity[] newArray(int size) {
            return new ShareEntity[size];
        }
    };

    @Override
    public String toString() {
        return "ShareEntity{" +
                "title='" + title + '\'' +
                ", text='" + text + '\'' +
                ", img='" + img + '\'' +
                ", needLogin=" + needLogin +
                ", url='" + url + '\'' +
                ", redirectUrl='" + redirectUrl + '\'' +
                '}';
    }
}
